import React from 'react'

export default function test() {

    const [ls, setLs] = React.useState([
        {
            "parent": [],
            "address": "南二环路052号",
            "distance": "40",
            "pname": "河北省",
            "importance": [],
            "biz_ext": {
                "cost": "59.00",
                "opentime2": "周一至周日 12:00-22:00",
                "rating": "3.7",
                "open_time": "12:00-22:00",
                "meal_ordering": "0"
            },
            "biz_type": "diner",
            "cityname": "保定市",
            "type": "餐饮服务;餐饮相关场所;餐饮相关",
            "photos": [
                {
                    "title": [],
                    "url": "http://store.is.autonavi.com/showpic/d615633efa16d3034ade7a839ec05ab1"
                },
                {
                    "title": [],
                    "url": "http://store.is.autonavi.com/showpic/a8bf55ef42db5d34eac053f935011ae9"
                },
                {
                    "title": [],
                    "url": "http://store.is.autonavi.com/showpic/644bdb62606dcda82592de92300d05d1"
                }
            ],
            "typecode": "050000",
            "shopinfo": "0",
            "poiweight": [],
            "childtype": [],
            "adname": "莲池区",
            "name": "川湘园(地质大学店)",
            "location": "115.488514,38.814985",
            "tel": "17503215361;18730283331",
            "shopid": [],
            "id": "B0FFFE2S68"
        },
        {
            "parent": [],
            "address": "河北科技学院-第3教学楼西侧50米",
            "distance": "132",
            "pname": "河北省",
            "importance": [],
            "biz_ext": {
                "cost": [],
                "opentime2": "周一至周日 10:00-22:00",
                "rating": "3.5",
                "open_time": "10:00-22:00",
                "meal_ordering": "0"
            },
            "biz_type": "diner",
            "cityname": "保定市",
            "type": "餐饮服务;餐饮相关场所;餐饮相关",
            "photos": [
                {
                    "title": [],
                    "url": "http://store.is.autonavi.com/showpic/50ee51349d60a83d7d5622091e18d1e8"
                }
            ],
            "typecode": "050000",
            "shopinfo": "1",
            "poiweight": [],
            "childtype": [],
            "adname": "莲池区",
            "name": "胖哥炸串",
            "location": "115.488468,38.816025",
            "tel": "15771589559",
            "shopid": [],
            "id": "B0H1ML0R2X"
        },
    ])

    const [imgls, setImgls] = useState([])

    const fn = () => {
        setImgls(data.map(item => item.photos[0].url))
        console.log(imgls);

    }
    fn()


    const data = [
        {
            "parent": [],
            "address": "南二环路052号",
            "distance": "40",
            "pname": "河北省",
            "importance": [],
            "biz_ext": {
                "cost": "59.00",
                "opentime2": "周一至周日 12:00-22:00",
                "rating": "3.7",
                "open_time": "12:00-22:00",
                "meal_ordering": "0"
            },
            "biz_type": "diner",
            "cityname": "保定市",
            "type": "餐饮服务;餐饮相关场所;餐饮相关",
            "photos": [
                {
                    "title": [],
                    "url": "http://store.is.autonavi.com/showpic/d615633efa16d3034ade7a839ec05ab1"
                },
                {
                    "title": [],
                    "url": "http://store.is.autonavi.com/showpic/a8bf55ef42db5d34eac053f935011ae9"
                },
                {
                    "title": [],
                    "url": "http://store.is.autonavi.com/showpic/644bdb62606dcda82592de92300d05d1"
                }
            ],
            "typecode": "050000",
            "shopinfo": "0",
            "poiweight": [],
            "childtype": [],
            "adname": "莲池区",
            "name": "川湘园(地质大学店)",
            "location": "115.488514,38.814985",
            "tel": "17503215361;18730283331",
            "shopid": [],
            "id": "B0FFFE2S68"
        },
    ]



    return (
        <div>

        </div>
    )
}
